package com.mc.lp.database.service.handler.constant;


public enum SearchParam {
	REGISTRATION_ID(1L),
	MOBILE_NUMBER(2L), 
	FIRST_NAME(3L), 
	LAST_NAME(4L), 
	EMAIL_ADDRESS(5L), 
	USER_ID(6L);

	private Long uiId;

	SearchParam(Long uiId) {
		this.uiId = uiId;
	}

	public Long getUiId() {
		return uiId;
	}

	public static SearchParam getType(Long uiId) {

		if (uiId == null) {
			return null;
		}

		for (SearchParam searchParam : SearchParam.values()) {
			if (uiId.equals(searchParam.getUiId())) {
				return searchParam;
			}
		}
		throw new IllegalArgumentException("No matching type for id " + uiId);
	}
}
